package com.caocaog.market.entity.dto;

import com.getui.push.v2.sdk.common.ApiResult;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 * 推送API结果DTO（可序列化）
 */
public class PushAPIResultDTO<T> extends ApiResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    public PushAPIResultDTO<T> convertFor(ApiResult<T> apiResult) {
        if (apiResult == null) return null;
        BeanUtils.copyProperties(apiResult, this);
        return this;
    }
}
